﻿<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <script src="../script/jquery.min.js"></script>
    <script src="../script/jquery.easyui.min.js"></script>
    <link href="../themes/default/easyui.css" rel="stylesheet" />
    <link href="../themes/icon.css" rel="stylesheet" />
    <link href="../themes/Site.css" rel="stylesheet" />
    <title></title>
    <style type="text/css">
        
    </style>
    <style type="text/css">
        .big {
        width:100%;
        height:300px;
        border:1px solid;
        border-color:darkgray;
        }
    </style>
    <script type="text/javascript">
        $(function () {          
            $('#dg').datagrid({
                fitColumns: true,
                //toolbar: "#tb",
                pagination: true,
                fit: true,
                singleSelect: true,
                rownumbers:true,
                url: '/Json/datagrid_data1.json',
                method:"get",
                columns: [[
                    { field: 'productid', title: '等级编号', width: 100 },
                    { field: 'productname', title: '等级名称', width: 100 },
                    { field: 'price', title: 'Price', width: 100, align: 'right' }
                ]]
            });        
            $("#btndelete").click(function () {
                $.messager.confirm('确认', '您确认想要删除记录吗？', function (r) {
                    if (r) {
                        alert('确认删除');
                    }
                });
            })
            $("#btnnew").click(function () {
                $("#dlg").dialog({
                    width: 300,
                    height: 250,
                }).dialog("setTitle", "新增会员卡类别").dialog("open");
                $("#frm").attr("src", "InsertMember.html");
            });
            $("#btnupdate").click(function () {
                var row = $("#dg").datagrid("getSelected");
                if (row != null) {
                    $("#dlg").dialog({
                        width: 350,
                        height: 250
                    }).dialog("setTitle", "修改会员卡类别").dialog("open");
                    $("#frm").attr("src", "UpdateMember.html");
                }
                else {
                    $.messager.alert("提示", "请选择需要编辑的行", "warning");
                }
            });
        })
    </script>
	<meta charset="utf-8" />
</head>
<body>       
        <a id="btnnew" class="easyui-linkbutton" data-options="iconCls:'icon-add'">新增</a>
        <a id="btnupdate" class="easyui-linkbutton" data-options="iconCls:'icon-edit'">修改</a>
        <a id="btndelete" class="easyui-linkbutton" data-options="iconCls:'icon-remove'">删除</a><br />
        等级名称：<input type="text" id="name" style="width:100px;height:13px;" />
        <a id="btn" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'">查询</a>  
       <table id="dg"></table>                    
    <div id="dlg">
        <iframe id="frm" width="99%" height="98%" frameborder="0" scrolling="no"></iframe>
    </div>    
    <div id="pp" class="easyui-pagination" data-options="total:2000,pageSize:10" style="background:#efefef;border:1px solid #ccc;"></div>
</body>
</html>
